package com.huawei.appgallery.assistantdock.gamemode.card;

import android.content.Context;
import android.os.Handler;
import android.os.Message;
import com.huawei.android.internal.util.ScreenshotHelperEx;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import o.beo$d;
import o.beo.f;
import o.bif.d;
import o.Logger;
import o.fam;

public class ScreenshotEnterCardBuoy extends BuoyBaseEnterCard {
    private Runnable ʻ = new Runnable(this) {
        final /* synthetic */ ScreenshotEnterCardBuoy ˎ;

        {
            this.ˎ = r1;
        }

        public void run() {
            try {
                if (this.ˎ.ᐝ == null) {
                    this.ˎ.ᐝ = new UIHandler();
                }
                new ScreenshotHelperEx(this.ˎ.ʼॱ).takeScreenshot(1, true, true, this.ˎ.ᐝ);
            } catch (Throwable th) {
                Logger.e("ScreenshotEnterCardBuoy", "take screen shot throwable");
            }
        }
    };
    private UIHandler ᐝ;

    static final class UIHandler extends Handler {
        private UIHandler() {
        }

        public void handleMessage(Message message) {
            Logger.ˎ("ScreenshotEnterCardBuoy", "Screen shot msg:" + message);
            super.handleMessage(message);
        }
    }

    public ScreenshotEnterCardBuoy(Context context) {
        super(context);
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        this.ˊ.setText(f.ॱʽ);
        this.ʼ.setBackgroundResource(beo$d.ˎˏ);
    }

    public void ˋ() {
        fam.ॱ().ˊ(this.ʼॱ, 1800);
        ˏ("CLICK");
        if (this.ᐝ == null) {
            this.ᐝ = new UIHandler();
        }
        this.ᐝ.postDelayed(this.ʻ, 500);
    }

    String ᐝ() {
        return d.GSS_SCREEN_SHOT.ˊ();
    }
}
